<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title></title>
<link href="_css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="_script/jquery.js"></script>
<script src="_script/jquery.colorbox.js"></script>
<link type="text/css" media="screen" rel="stylesheet"
        href="_script/jquery.colorbox.css" />
<script type="text/javascript" src="_script/jquery.jgrowl.js"></script>
<link rel="stylesheet" type="text/css" href="_script/jquery.jgrowl.css"
        media="screen" />
<link rel="stylesheet" type="text/css" href="themes/blue/style.css"
        media="screen" />
<!--[if lt IE 7]><LINK href="_script/jquery.jgrowl.ie6.css" type=text/css rel=stylesheet><![endif]-->
<!-- / fim dos arquivos utilizados pelo jQuery jgrowl plugin -->
</head>
<body>
        <div id="box_tools" class="floor_t">
                <div class="toolbgline"></div>
        </div>
        <div class="floor_c">
                <div class="xn"></div>
                <div class="boxf">
                        <div class="boxn">
                                <a href="javascript:location.reload();"
                                        style="color: green; float: right;">刷新</a><br />
                                <form name="form" method="post" action="?action=edit&did=<?php echo $delivery['did']?>">
                                        <table border="0" cellspacing="1" class="tablesorter">
                                                <tbody>
                                                        <tr>
                                                                <td>ID</td>
                                                                <td><?php echo $delivery['did']. ' - '. $delivery['status']; ?> </td>
                                                        </tr>
                                                        <tr>
                                                                <td>状态</td>
                                                                <td><?php echo $delivery['status_info']?></td>
                                                        </tr>
                                                        <tr>
                                                                <td>商品</td>
                                                                <td>
                                                                        <table>
                                                                        <?php foreach($goods as $good){?>
                                                                        <tr>
                                                                                <td><?php echo $good['extype']?></td>
                                                                                <td><?php echo $good['ex']?></td>
                                                                        </tr>
                                                                        <?php }?>
                                                                        </table>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td>用户</td>
                                                                <td><?php echo $delivery['uname']?></td>
                                                        </tr>
                                                        <tr>
                                                                <td>收件人</td>
                                                                <td><?php echo $delivery['consignee']?></td>
                                                        </tr>
                                                        <tr>
                                                                <td>国家</td>
                                                                <td><?php echo $delivery['country']?></td>
                                                        </tr>
                                                        <tr>
                                                                <td>城市</td>
                                                                <td><?php echo $delivery['city']?></td>
                                                        </tr>
                                                        <tr>
                                                                <td>邮编</td>
                                                                <td><?php echo $delivery['zip']?></td>
                                                        </tr>
                                                        <tr>
                                                                <td>电话</td>
                                                                <td><?php echo $delivery['tel']?></td>
                                                        </tr>
                                                        <tr>
                                                                <td>详细地址</td>
                                                                <td><?php echo $delivery['address']?></td>
                                                        </tr>
                                                        <tr>
                                                                <td>商品总重</td>
                                                                <td><?php echo $allWeight;?>kg</td>
                                                        </tr>
														<?php if($delivery['status'] > 3){ ?>
														<tr>
                                                                <td>货运总价格</td>
                                                                <td><?php echo $allPrice;?></td>
                                                        </tr>
														<?php } ?>
                                                        <tr>
                                                                <td>否取出单据</td>
                                                                <td><?php if($delivery['receipt']){echo'是';}else{echo'否';}?></td>
                                                        </tr>
                                                        <tr>
                                                                <td>是否加固 </td>
                                                                <td><?php if( $delivery['firm']){echo'是';}else{echo'否';}?></td>
                                                        </tr>
                                                        <tr>
                                                                <td>是否购买箱子</td>
                                                                <td><?php if( $delivery['box']){echo'是';}else{echo'否';}?></td>
                                                        </tr>
                                                        <tr>
                                                                <td>备注</td>
                                                                <td><?php echo $delivery['remark'];?></td>
                                                        </tr>
                                                        <?php if($delivery['status'] == 5){?>
                                                        <tr>
                                                                <td>快递名称</td>
                                                                <td>
                                                                <select name="deliveryname">
                                                                        <option value="TNT" selected="selected">TNT</option>
                                                                        <option value="DHL">DHL</option>
                                                                        <option value="EMS">EMS</option>
                                                                        <option value="其他">其他</option>
                                                                </select> 
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td>快递单号</td>
                                                                <td><input type="text" name="deliverynum" maxlength="50"/></td>
                                                        </tr>
                                                        <tr>
                                                                <td>确定发货？<input type="hidden" name="status" value="7" /></td>
                                                                <td><input type="submit" value="发货"/></td>
                                                        </tr>
                                                        <?php }else if($delivery['status'] == 9){?>
                                                        <tr>
                                                                <td>评论</td>
                                                                <td><?php echo $delivery['comment'];?></td>
                                                        </tr>
                                                        <tr>
                                                                <td>评论时间</td>
                                                                <td><?php echo date('Y-m-d H:i:s', $delivery['commenttime']);?></td>
                                                        </tr>
                                                        <tr>
                                                                <td>回复</td>
                                                                <td>
                                                                        <textarea rows="5" cols="20" name="reply"></textarea>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td>确定回复？<input type="hidden" name="status" value="10" /></td>
                                                                <td><input type="submit" value="回复"/></td>
                                                        </tr>
                                                        <?php }else if($delivery['status'] == 10){?>
                                                        <tr>
                                                                <td>评论</td>
                                                                <td><?php echo $delivery['comment'];?></td>
                                                        </tr>
                                                        <tr>
                                                                <td>评论时间</td>
                                                                <td><?php echo date('Y-m-d H:i:s', $delivery['commenttime']);?></td>
                                                        </tr>
                                                        <tr>
                                                                <td>回复</td>
                                                                <td><?php echo $delivery['reply'];?></td>
                                                        </tr>
                                                        <tr>
                                                                <td>回复时间</td>
                                                                <td><?php echo date('Y-m-d H:i:s', $delivery['replytime']);?></td>
                                                        </tr>
                                                        <?php }else if($delivery['status'] == 1 || $delivery['status'] == 4){?>
																<tr>
                                                                <td>包装总重</td>
                                                                <td>
                                                                        <input type="text" name="weight" maxlength="10" value="<?php echo $allWeight;?>"/>kg
                                                                </td>
                                                                </tr>
															<?php if( $delivery['firm']){ ?>
															 <tr>
																	<td>加固费用</td>
																	<td><input type="text" name="firm_price" maxlength="10" value="<?php echo $delivery['firm_price'];?>"/></td>
															</tr>
															<?php  } ?>
															<?php if( $delivery['box']){ ?>
															<tr>
																	<td>箱子费用</td>
																	<td><input type="text" name="box_price" maxlength="10" value="<?php echo $delivery['box_price'];?>"/></td>
															</tr>
															<?php } ?>
   
                                                                <tr>
                                                                <td>运费</td>
                                                                <td>
                                                                        <input type="text" name="price" maxlength="10" value="<?php echo $delivery['price'];?>"/>
                                                                        <input type="hidden" name="status" value="4"/>
                                                                </td>
                                                                </tr>
                                                                <tr>
                                                                <td colspan="2"><input type="submit" value="操作"/></td>
                                                                </tr>
                                                        <?php }else if($delivery['status'] == 2){?>
                                                        <tr>
                                                                <td colspan="2">等待审核</td>
                                                        </tr>
                                                        <?php }else if($delivery['status'] == 3){?>
                                                        <tr>
                                                                <td>运费</td>
                                                                <td>
                                                                        <input type="text" name="price" maxlength="10"/>
                                                                        <input type="hidden" name="status" value="4"/>
                                                                </td>
                                                                </tr>
                                                                <tr>
                                                                <td colspan="2"><input type="submit" value="操作"/></td>
                                                                </tr>
                                                        <?php }else if($delivery['status'] == 4){?>														<tr>															<td>货运总价格</td>															<td><?php echo $delivery['price'];?></td>														</tr>
                                                        <tr>
                                                                <td colspan="2">等待付款</td>
                                                        </tr>
                                                        <?php  }else{ ?>														<tr>															<td>货运总价格</td>															<td><?php echo $delivery['price'];?></td>														</tr>
                                                        <tr>
                                                                <td>快递名称</td>
                                                                <td><?php echo $delivery['deliveryname'];?></td>
                                                        </tr>
                                                        <tr>
                                                                <td>快递单号</td>
                                                                <td><?php echo $delivery['deliverynum'];?></td>
                                                        </tr>
                                                        <tr>
                                                                <td colspan="2">等待收货和评论</td>
                                                        </tr>
                                                        <?php }?>
                                                </tbody>
                                        </table>
                                </form>
                        </div>
                </div>
        </div>
</body>
</html>